import oss2

auth = oss2.Auth('LTAI5tMo83UWmGUn3NE5BR5B', 'qC6rbofciAANsektrkkSMDtcnH8uIs')
bucket = oss2.Bucket(auth, 'https://oss-cn-beijing.aliyuncs.com', 'mtz-dev')

def uploadToOss(file):
    filePath = file.filename
    result = bucket.put_object(filePath, file)
    return result